<?php
/* @var $this CapchaController */
/* @var $model Capcha */
/* @var $form CActiveForm */
?>

<div class="grid-24">
  <div class="widget">
    <div class="widget-header">
      <span class="icon-plus"></span>
      <h3><?php echo Yii::t('main', 'category.create'); ?></h3>
    </div>
    <!-- .widget-header -->

    <div class="widget-content">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'capcha-form',
    'enableAjaxValidation'=>false,
)); ?>

	<?php if ($capcha) { ?>
	<div class="row">
		<img width="400px" alt="" src="/images/data/<?php echo $capcha['site_id'] . '/' . $capcha['captcha_id'] . '.' . $capcha['extension']?>"/>
	</div>
	<div class="row">
		<span>Dang ky: </span><span><?php echo $capcha['create_time']; ?></span>
	</div>
	<?php } else { ?>
	    khong co du lieu
	<?php } ?>


	<div class="row">
		<input type="text" id="capchacontent" name="content" value="" />
		<input type="hidden" id="captchaId" name="captchaId" value="<?php if ($capcha) {echo $capcha['captcha_id'];}?>"/>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Refresh'); ?>
	</div>

<?php $this->endWidget(); ?>

    </div>
  </div>
</div>


<?php
$cs = Yii::app()->getClientScript();
$cs->registerScriptFile(Yii::app()->baseUrl . '/js/captcha.js');
?>